//
//  StoryPageCell.m
//  PetTown
//
//  Created by lanou3g on 15/5/30.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "StoryPageCell.h"
#import "StoryDetails.h"
#import "UIImageView+WebCache.h"
@implementation StoryPageCell


-(void)setStoryPage:(StoryPage *)storyPage
{
    [_photo_img sd_setImageWithURL:[NSURL URLWithString:storyPage.photo]];

    
    //评论者头像
    [_avatar_img sd_setImageWithURL:[NSURL URLWithString:storyPage.avatar]];
    
    if (_avatar_img.frame.size.width > _avatar_img.frame.size.height) {
        _avatar_img.contentMode = UIViewContentModeScaleAspectFit;
    }else{
        _avatar_img.contentMode = UIViewContentModeScaleToFill;
    }
    
    //边框
    CALayer * layer = [_avatar_img layer];
    layer.borderColor = [UIColor whiteColor].CGColor;
    layer.borderWidth = 2.0f;
    
    _photo_desLabel.text = storyPage.photo_des;
    _plumLabel.text = storyPage.plnum;

    
}





- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}



@end
